//== Theme Variables
@panel-footer-color:  @navbar-inverse-color;
@default-margin-bottom: 24px;
@package-list-line-height: 20px;

//== Theme Definition
html, body {
  width: 100%;
  height: 100%;
}

body {
  display: table;

  h1, h2, h3, p {
    margin-bottom: @default-margin-bottom;
  }

  h2, h3 {
    margin-top: 40px;
  }
}

#autocomplete-results-container {
  position: absolute;
  z-index: 1;
  background-color: white;
  border: 1px solid black;
  display: none;
  left: 0;
  right: 0;
  margin-left: floor((@grid-gutter-width / 2));
  margin-right: floor((@grid-gutter-width / 2));

  .autocomplete-row-data {
    padding-top:2px;
    padding-bottom:2px;
    color:@text-color;

    :focus {
      background-color: @input-border-focus;
    }
  }

  .autocomplete-row-id {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .autocomplete-row-owners {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

.footer {
  background-color: @panel-footer-bg;
  color: @panel-footer-color;
  font-size: 1em;
  display: table-row;
  height: 1px;

  .footer-heading {
    display: block;
    margin-bottom: 11px;
    font-size: @font-size-h4;
  }

  .container {
    margin-top: 50px;
    margin-bottom: 50px;

    // This is a workaround for the following bug:
    // https://github.com/microsoft/accessibility-insights-web/issues/692
    background-color: @panel-footer-bg;
  }

  a {
    color: @panel-footer-color;
  }

  .footer-release-info {
    font-size: 0.85em;
    margin-top: 20px;
  }

  @media (min-width: @screen-md-min) {
    .footer-dotnet-foundation-logo {
      text-align: right;
    }

    .footer-release-info {
      padding-left: 0;
    }
  }
}

.row-gap {
  margin-top: 50px;
}

.search-container {
  padding-top: 16px;
  padding-bottom: 16px;
}

.main-container {
  padding-bottom: 75px;
  height: auto;
}

.navbar-logo {
  margin: 8px 20px 0 0;
}

.dropdown-menu {
  padding-top: (@padding-large-vertical * 2);
  padding-bottom: (@padding-large-vertical * 2);

  .dropdown-profile {
    @media (max-width: @grid-float-breakpoint-max) {
      padding-top: 5px;
    }

    .dropdown-username {
      font-size: @font-size-large;
    }

    .dropdown-email {
      font-size: @font-size-small;
    }
  }
}

.btn-search {
  height: 36px;
}

.icon-link, .icon-text {
  .ms-Icon {
    position: relative;
    top: 2px;
  }
}

.icon-link:hover, .icon-link:focus {
  text-decoration: none;

  span {
    text-decoration: underline;
  }
}

.dependency-groups {
  h4 {
    line-height: 1.4;

    > span {
      border-bottom: 1px solid #d8d8d8;
      margin-bottom: 3px;
    }
  }
}

.dependency-group {

  li span {
    color: #666;
  }
}

.borderless {
  > tbody {
    > tr {
      > td {
        border: none;
      }
    }
  }
}

.no-clickonce {
  display: none;
}

.tag {
  color: @link-color-darker;
  background-color: #eff9ff;
  padding: 2px 10px;
  line-height: 2em;
  margin: 0 2px;

  &:hover,
  &:focus {
    color: @link-hover-color;
  }
}

.banner {
  padding-bottom: 10px;
  padding-top: 5px;

  span {
    font-size: 1.25em;
    line-height: 1.75em;
  }

  .ms-Icon {
    position: relative;
    top: 2px;
  }

  a {
    color: @link-hover-color;
    text-decoration: underline;
  }

  a:hover, a:focus {
    color: darken(@link-hover-color, 15%);
  }

  &.banner-bright {
    background: yellow;
  }

  &.banner-notice {
    background: @alert-info-bg;
  }

  &.banner-info {
    background: @info-bg;
  }
}

.alert {
  a {
    color: @link-color-darker;

    &:hover,
    &:focus {
      color: @link-hover-color;
    }
  }
}

.alert-transient {
  .alert {
    margin: 0;
    padding: 10px;
  }
}

.alert-transient-jumbotron {
  background-color: #004880
}

.ms-Icon-ul {
  margin-left: 24px;

  li {
    position: relative;

    i.ms-Icon {
      position: absolute;
      left: -24px;
    }
  }
}

h2, h3 {
  .ms-Icon {
    font-size: 0.6em;
    position: relative;
    top: -2px;
  }

  a, a:hover, a:focus, a:active {
    color: @text-color;
    text-decoration: none;
  }
}

@media screen and (max-width: @screen-sm) {
  .container {
    // Bootstrap doesn't set the container width when the screen is xs.
    // This works fine when there are no elements in the container that are wider than the viewport,
    // however, if there are elements in the container that are wider than the viewport,
    // their overflow properties will not work properly because they are not bound by the size of the container.
    // To fix this, we need to set the container width to be the width of the viewport minus the row margin on xs screens.
    // This way, those elements that are larger than the viewport are properly bound by the size of the container and overflow properly.
    // 2020.10.27: We actually need to set it slightly smaller than the row margin as a horizontal scrollbar appears at xs when exactly matched.
    width: calc(100vw - 20px);
  }

  .navbar-toggle {
    margin-right: 0;
  }

  img.package-icon {
    max-width: 60px;
    max-height: 60px;
  }
}

@media screen and (max-width: 480px) {
    .hidden-tiny {
        display: none;
    }
}

img.package-icon {
  margin-left: auto;
  margin-right: auto;
}

img.reserved-indicator-icon {
  margin-left: auto;
  margin-right: auto;
}

.table-container {
  overflow-x: auto;
}

.package-list {
  margin-top: 8px;
  margin-bottom: 8px;
  padding-left: 0;
  line-height: @package-list-line-height;
  color: @gray-light;

  a:not(.more-tags) {
    color: @gray-light;
  }

  li {
    list-style: none;
    display: list-item;
  }

  @media (min-width: @screen-sm-min) {
    li {
      display: inline-block;
      line-height: @package-list-line-height;
      max-height: (@package-list-line-height * 5 + 1px);
      overflow-y: hidden;
      padding-right: @padding-small-horizontal;
    }
  }
}

.package-title-text {
  margin-bottom: 0;
}

// Make the hamburger button visible on high contrast.
.icon-bar {
  border: 1px solid #fff;
}

.disabled {
  pointer-events: none;
  opacity: 0.75;
}

.radio, .checkbox {
  .label-sibling {
    margin-left: 20px;
  }
}

.break-word {
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: normal;
  word-break: break-word;
}

.showOnFocus {
  display: block;
  line-height:0;
  height: 0;
  overflow: hidden;
}

.showOnFocus:focus {
  line-height:2em;
  height: 2em;
  color: @navbar-inverse-color;
}

.breadcrumb-title {
  margin-bottom: 0px;
}

.breadcrumb-divider {
  margin-top: 15px;
  margin-bottom: 15px;
}

.breadcrumb-menu {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 33px;

  h1 {
    margin-top: 0px;
  }
}

.page-account-settings, .page-manage-organizations {
  .small-fingerprint {
    font-size: 75%;
  }
}

.usabilla-button {
  top: auto !important;
  margin-top: -65px;
  bottom: 20%;
  width: 40px;
  height: 130px;
  position: fixed;
  z-index: 99999;
  right: 0;
}

.sortable {
	cursor: pointer;
}
